<template>
	<div class="swiper-container">
		<div class="swiper-wrapper">
		    <div class="swiper-slide" v-for="item in figureList">
		    	<a :href="item.url">
		    		<img :src="item.imageUrl" alt="">
		    	</a>
		    </div>
		</div>
	</div>
</template>
<script>
	import $ from 'jquery';
	import Swiper from 'swiper';
	export default {
		data:function () {
			return {
				figureList: []
			}
		},
		mounted:function () {
			var that = this;
			var figureUrl = 'http://localhost:3000/figure?time='+new Date().getTime();
			$.get(figureUrl,function(res) {
				that.figureList = res.data.billboards;
				that.$nextTick(function()	{
					new Swiper('.swiper-container', {
						autoplay: 3000, 
						loop:true,
						autoplayDisableOnInteraction: false
					})
				})
			})
		}
	}
</script>